
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="UTF-8"/>
    <title>登录</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="*"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" type="text/css" media="all"
          th:href="@{/plugins/layui/css/layui.css}" />
    <link rel="stylesheet" th:href="@{css/login.css}"/>


</head>
<body>



<input id="erro"  type="hidden"  th:value="${message}" />
    <div class="body">
        <div class="head">
            后台管理系统
        </div>
        <form  class="main layui-form" method="post" action="/dologin">
            <div class="layui-form-item text-style" >
                <i class="layui-icon icon" style=" color: #1E9FFF;">&#xe612;</i>
                <div class="layui-input-block">
                    <input name="username" lay-verify="required"  autocomplete="off"  placeholder="账号" class="layui-input" type="text"  />
                </div>
            </div>
            <div class="layui-form-item text-style">
                <i class="layui-icon icon" style=" color: #1E9FFF;">&#xe642;</i>
                <div class="layui-input-block">
                    <input name="password" lay-verify="required"  autocomplete="off" placeholder="密码" class="layui-input" type="password"  />
                </div>
            </div>
            <div class="layui-form-item text-style">
                <div class="checkout">
                    <input name="code" lay-verify="title" autocomplete="off" placeholder="验证码" class="layui-input" type="text" />
                </div>
                <img src="/getGifCode" class="code" title="点击,换一张验证码"  onclick="this.src='/getGifCode?'+Math.random()"/>
            </div>
            <div class="layui-form-item" >
                <input name="rememberMe" lay-skin="primary" title="记住密码" type="checkbox"/>
                <a herf="www.baidu.com">忘记密码</a>
            </div>
            <button class="layui-btn layui-btn-fluid" lay-submit="lay-submit"    lay-filter="login" >登录</button>
        </form >
        <div class="foot"></div>
    </div>
<!--    错误信息：
    <h4 id="erro" th:text="${message}"></h4>
    <form id="myForm" action="/login" method="post">
    <p>
    账号：<input type="text" name="username" id="username"  />
    </p>
    <p>
    密码：<input type="text" name="password" id="password"  />
    </p>
    验证码:<input type="text" name="code" placeholder="请输入验证码"/><img src="/getGifCode"/>
    <br /><br />
    记住密码:<input type="checkbox" name="rememberMe"   /><br />
    <p>
    <input type="submit" id="ajaxLogin" value="登录" />
    </p>
    </form>-->
<script th:src="@{/plugins/jQuery/jquery.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/plugins/layui/layui.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/js/login.js}" type="text/javascript" charset="utf-8"></script>
<!--<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        console.log("111111");
        //自定义验证规则
        form.verify({
            username: function(value, item) {
                console.log("2222222222");
                if (!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)) {
                    return '用户名不能有特殊字符';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });
        //监听提交
        form.on('submit(formDemo)', function(data){
            console.log("3333333333");
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>-->
</body>
</html>
